home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "AS/400 Data Queue VBX"
- ClientHeight = 6795
- ClientLeft = 585
- ClientTop = 375
- ClientWidth = 7530
- Height = 7200
- Icon = DQSAMPLE.FRX:0000
- Left = 525
- LinkTopic = "Form1"
- ScaleHeight = 6795
- ScaleWidth = 7530
- Top = 30
- Width = 7650
- Begin TextBox txtError
- Height = 285
- Left = 5640
- MaxLength = 2
- TabIndex = 28
- Text = "4"
- Top = 5640
- Width = 495
- End
- Begin Generic dq1
- DQ_Authority = 0 'All
- DQ_Force = 0 '0 = False
- DQ_Function = 0 'None
- DQ_Length = 0
- DQ_Library = ""
- DQ_Mode = 0 'Translation & Peek Off
- DQ_QueueName = ""
- DQ_ReceiveWait = 0
- DQ_ReturnCode = 0
- DQ_SenderID = 0 '0 = False
- DQ_Sequence = 0 'LIFO
- DQ_SystemName = ""
- DQ_Text = ""
- Left = 6960
- Top = 960
- End
- Begin TextBox txtSendData
- Height = 285
- Left = 1920
- MaxLength = 4000
- TabIndex = 6
- Top = 2160
- Width = 4575
- End
- Begin TextBox txtSender
- Enabled = 0 'False
- Height = 285
- Left = 120
- MaxLength = 152
- TabIndex = 27
- Top = 5640
- Width = 5295
- End
- Begin TextBox txtData
- Enabled = 0 'False
- Height = 1215
- Left = 120
- MaxLength = 4000
- MultiLine = -1 'True
- TabIndex = 7
- Top = 4080
- Width = 5415
- End
- Begin TextBox txtDQText
- Height = 285
- Left = 1920
- MaxLength = 50
- TabIndex = 4
- Top = 1200
- Width = 4575
- End
- Begin CommandButton cmdStop
- Caption = "&Stop"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 2040
- TabIndex = 17
- Top = 6120
- Width = 1695
- End
- Begin TextBox txtMode
- Height = 285
- Left = 1920
- MaxLength = 1
- TabIndex = 5
- Top = 1680
- Width = 255
- End
- Begin Frame Frame1
- Caption = "Data Queue Function"
- Height = 1095
- Left = 120
- TabIndex = 21
- Top = 2640
- Width = 5895
- Begin OptionButton optPut
- Caption = "Put"
- Height = 255
- Left = 3360
- TabIndex = 13
- Top = 360
- Width = 855
- End
- Begin OptionButton optReceive
- Caption = "Receive Data"
- Height = 250
- Left = 1560
- TabIndex = 15
- Top = 720
- Width = 1500
- End
- Begin OptionButton optSend
- Caption = "Send Data"
- Height = 250
- Left = 1560
- TabIndex = 12
- Top = 360
- Width = 1500
- End
- Begin OptionButton optClear
- Caption = "Clear"
- Height = 255
- Left = 4440
- TabIndex = 11
- Top = 360
- Width = 1020
- End
- Begin OptionButton optDelete
- Caption = "Delete"
- Height = 250
- Left = 3360
- TabIndex = 10
- Top = 720
- Width = 1500
- End
- Begin OptionButton optCreate
- Caption = "Create "
- Height = 250
- Left = 120
- TabIndex = 9
- Top = 700
- Width = 1500
- End
- Begin OptionButton optSet
- Caption = "Set Mode"
- Height = 250
- Left = 120
- TabIndex = 8
- Top = 360
- Width = 1500
- End
- End
- Begin CommandButton cmdRun
- Caption = "&Run"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 120
- TabIndex = 14
- Top = 6120
- Width = 1695
- End
- Begin TextBox txtDQLength
- Height = 285
- Left = 5760
- MaxLength = 4
- TabIndex = 3
- Top = 720
- Width = 735
- End
- Begin TextBox txtSystemName
- Height = 285
- Left = 1920
- TabIndex = 0
- Top = 240
- Width = 1575
- End
- Begin TextBox txtDQ
- Height = 285
- Left = 1920
- MaxLength = 10
- TabIndex = 2
- Top = 720
- Width = 1575
- End
- Begin TextBox txtLibraryName
- Height = 285
- Left = 5760
- MaxLength = 10
- TabIndex = 1
- Top = 240
- Width = 1575
- End
- Begin Label Label10
- Caption = "Data to Send"
- Height = 255
- Left = 120
- TabIndex = 25
- Top = 2160
- Width = 1695
- End
- Begin Label Label9
- Caption = "Sender Information"
- Height = 255
- Left = 120
- TabIndex = 26
- Top = 5400
- Width = 1695
- End
- Begin Label Label7
- Caption = "Data Queue Data"
- Height = 255
- Left = 120
- TabIndex = 24
- Top = 3840
- Width = 1695
- End
- Begin Label Label6
- Caption = "Data Queue Text :"
- Height = 255
- Left = 120
- TabIndex = 23
- Top = 1200
- Width = 1695
- End
- Begin Label Label5
- Caption = "Mode to Set"
- Height = 255
- Left = 120
- TabIndex = 22
- Top = 1680
- Width = 1215
- End
- Begin Label Label4
- Caption = "Data Queue Length :"
- Height = 255
- Left = 3840
- TabIndex = 20
- Top = 720
- Width = 2055
- End
- Begin Label Label3
- Caption = "System Name :"
- Height = 255
- Left = 120
- TabIndex = 19
- Top = 240
- Width = 2055
- End
- Begin Label Label2
- Caption = "Data Queue Name :"
- Height = 255
- Left = 120
- TabIndex = 18
- Top = 720
- Width = 1695
- End
- Begin Label Label1
- Caption = "Library Name :"
- Height = 255
- Left = 3840
- TabIndex = 16
- Top = 240
- Width = 1695
- End
- Option Explicit
- Sub cmdRun_Click ()
- DQ1.DQ_Library = txtLibraryName.Text
- DQ1.DQ_QueueName = txtDQ.Text
- DQ1.DQ_SystemName = txtSystemName.Text
- DQ1.DQ_Text = txtDQText.Text
- DQ1.DQ_SenderID = DQSenderNo
- DQ1.DQ_Authority = DQAutAll
- DQ1.DQ_Force = DQForceNo
- If optSet.Value Then
- DQ1.DQ_Mode = CInt(txtMode.Text)
- DQ1.DQ_Function = DQSetMode
- DQ1.Action = DQRun
- End If
- If optCreate.Value Then
- DQ1.DQ_Length = CInt(txtDQLength.Text)
- DQ1.DQ_Function = DQCreate
- DQ1.Action = DQRun
- End If
- If optDelete.Value Then
- DQ1.DQ_Function = DQDelete
- DQ1.Action = DQRun
- End If
- If optClear.Value Then
- DQ1.DQ_Function = DQClear
- DQ1.Action = DQRun
- End If
- If optSend.Value Then
- DQ1.DQ_SendData = RTrim(txtSendData.Text)
- DQ1.DQ_Function = DQSend
- DQ1.Action = DQRun
- End If
- If optPut.Value Then
- DQ1.DQ_SendData = RTrim(txtSendData.Text)
- DQ1.DQ_Function = DQPut
- DQ1.Action = DQRun
- End If
- If optReceive.Value Then
- DQ1.DQ_Function = DQReceive
- DQ1.DQ_ReceiveWait = 5
- DQ1.Action = DQRun
- txtData = DQ1.DQ_ReceiveData
- txtDQLength = CStr(DQ1.DQ_Length)
- End If
- If Len(LTrim(RTrim(DQ1.DQ_CPFMsgid))) > 0 Then
- MsgBox "CPF Message : " + DQ1.DQ_CPFMsgid + Chr(10) + DQ1.DQ_ReturnMessage, 16, "Data Queue Error"
- End If
- txtError = CStr(DQ1.DQ_ReturnCode)
- txtSender = DQ1.DQ_SenderInfo
- DQ1.DQ_CPFMsgid = ""
- End Sub
- Sub cmdStop_Click ()
- 'Stop Conversation
- DQ1.DQ_Function = DQStop
- DQ1.Action = DQRun
- End
- End Sub
-